
#ifdef FLASH_CODE_HEADER

static const uint32_t flash_code_STM32F401XX_OPT[61] = 
{
    0XE00ABE00,0X062D780D,0X24084068,0XD3000040,0X1E644058,0X1C49D1FA,0X2A001E52,0X4770D1F2,
    0X492B482C,0X492C6081,0X68C16081,0X431122F0,0X694060C1,0XD4060680,0X49284829,0X21066001,
    0X49286041,0X20006081,0X48224770,0X22016941,0X61414311,0X47702000,0X68C2481E,0X430A21F0,
    0X4A2160C2,0X69426142,0X431A2302,0X68C26142,0X0F120612,0X68C2D004,0X60C2430A,0X47702001,
    0X47702000,0X47702000,0X68114812,0X22F068C3,0X60C34313,0X40194B15,0X61411C89,0X03C968C1,
    0X68C1D4FC,0X0F090609,0X68C1D004,0X60C14311,0X47702001,0X47702000,0X4C06B510,0X4B0B6812,
    0X401A6964,0X42A2401C,0X1840D100,0X0000BD10,0X08192A3B,0X40023C00,0X4C5D6E7F,0X00005555,
    0X40003000,0X00000FFF,0X0FFFAAEC,0XCFFFFFFC,0X00000000,
};

static const program_target_t flash_algo_STM32F401XX_OPT =
{
    0X20000021,  // Init
    0X2000004B,  // UnInit
    0X20000059,  // EraseChip
    0X20000085,  // EraseSector
    0X20000089,  // ProgramPage

    {
        0x20000001,  // BKPT : start of blob + 1
        0x20000C00,  // RSB  : address to access global/static data
        0x20001000,  // RSP  : stack pointer 
    },

    0x20000400,                      // mem buffer location
    0x20000000,                      // location to write prog_blob in target RAM
    sizeof(flash_code_STM32F401XX_OPT),       // prog_blob size
    flash_code_STM32F401XX_OPT,               // address of prog_blob 
    0x00000400,                      // ram_to_flash_bytes_to_be_written
};

#endif

#ifdef FLASH_CODE_TABLE
&flash_algo_STM32F401XX_OPT
#endif

